package com.work.rcj.common.exception;

/**
 * @author yy
 * @Type ErrorEnum.java
 * @Desc
 * @date 2020/8/11 20:48
 */
public enum ErrorEnum implements IError {
    BODY_NOT_MATCH("400","请求的数据格式不符!"),
    SIGNATURE_NOT_MATCH("401","请求的数字签名不匹配!"),
    NOT_FOUND("404", "未找到该资源!"),
    INTERNAL_SERVER_ERROR("500", "服务器内部错误!"),
    SERVER_BUSY("503","服务器正忙，请稍后再试!"),
    VALIDATED_ERROR("500","参数错误!"),


    MUST_LOGIN("400001","请先登录!"),
    ;

    String errorCode;
    String errorMessage;

    ErrorEnum(String errorCode, String errorMessage) {
        this.errorCode = errorCode;
        this.errorMessage = errorMessage;
    }

    @Override
    public String getErrorCode() {
        return this.errorCode;
    }

    @Override
    public String getErrorMsg() {
        return this.errorMessage;
    }
}
